#ifndef __BSP_RGB_H
#define __BSP_RGB_H

#include "ch32f10x.h"
#include "debug.h"
#include "variable.h"



#define RGB_RCC				RCC_APB2Periph_GPIOA
#define RGB_PORT  		GPIOA
#define RGB_PIN				GPIO_Pin_8


           
#define RGB_DATA					PAout(8)
#define RGB_DATA_L 				PAout(8)=0                                                                                           
#define RGB_DATA_H 				PAout(8)=1
#define RGB_DATA_TOGGLE 	PAout(8) ^= (1<<0)


void RGB_Init(void);
void RGB_SetColorWithI(uint8_t *c1,uint8_t *c2,uint8_t w,uint8_t r,uint8_t g,uint8_t b);
void RGB_SetColor(uint8_t w,uint8_t r,uint8_t g,uint8_t b);
void RGB_Updata(void);
#endif
